import os
conven = 'python detect.py --weights best.pt --source '
savetxt = ' --save-txt'
route = 'images'
#图片 conven + route
#txt conven + route + savetxt
os.system(conven + route + savetxt)